<include file="Public:header" />
<div id="zoneHeader">
    <h2>站长管理</h2>
    <ul>
        <li><a href="?c=Siter&a=add" class="btn">增加站长</a></li>
    </ul>
</div><!--/#zoneHeader-->
<div id="zoneBody">
    <div id="zoneBodySearch">
        <form id="formSearch" action="?c={$Think.const.CONTROLLER_NAME}">
            <input type="hidden" name="sort" />
            <input type="hidden" name="sortdir" />

            <ul>
                <li><b>ID：</b><input type="text" name="id" class="fW80p" /></li>
                <li><b>站长名称：</b><input type="text" name="name" class="fW100p" /></li>
                <li hide="3"> <select name="service_id"> <option value="">所属客服</option> <volist name=":getAllSiterServiceList()" id="vo"> <option value="{$vo.id}">{$vo.contact}</option> </volist> </select> </li>
                <li><b>注册日期：</b><input type="text" name="add_day" class="fW100p" t="datebox">~<input type="text" name="add_day_2" class="fW100p" t="datebox"></li>
                <li rel="searchMoreItem"><b>最后登陆日期：</b><input type="text" name="last_login_day" class="fW100p" t="datebox"></li>
                <li>
                <select name="status">
                    <option value="">站长状态</option>
                    <volist name=":C('USER_STATUS')" id="vo">
                    <option value="{$key}">{$vo}</option>
                    </volist>
                </select>
                </li>
                <li rel="searchMoreItem">
                    <select name="limit_ad_domain">
                        <option value="">域名投放限制</option>
                        <option value="1">限制投放域名</option>
                        <option value="0">不限制投放域名</option>
                    </select>
                </li>
                <li rel="searchMoreItem" hide="3">推荐人：<input type="text" name="recommend" class="fW80p" /></li>
                <li rel="searchMoreItem">注册来路：<input type="text" name="referr" class="fW150p" /></li>
                <li rel="searchMoreItem">邮箱：<input type="text" name="email" class="fW150p" /></li>
                <li rel="searchMoreItem">QQ：<input type="text" name="qq" class="fW150p" /></li>
                <li rel="searchMoreItem">
                    <select name="money_type">
                        <option value="day">日余额</option>
                        <option value="weeek">周余额</option>
                        <option value="month">月余额</option>
                        <option value="total">总余额</option>
                    </select>
                    <select name="money_op">
                        <option value="1">不少于</option>
                        <option value="2">不多于</option>
                        <option value="3">等于</option>
                    </select>
                    <input type="text" name="money_val" value="" class="fW80p" />元
                </li>
                <li><button type="button" id="as" class="btnSearch">查询</button></li>
                <li><button type="button" class="btnResetForm">清空表单</button></li>
                <li><label><input type="checkbox" class="btnSearchMore" /><span>高级查询</span></label></li>
            </ul>
        </form>
    </div><!--/#zoneBodySearch-->
    <div id="zoneBodyContent">
        <table class="table2">
            <thead>
                <tr>
                    <th class="tAr"><a href="javascript:;" sort="id">ID</a></th>
                    <th><a href="javascript:;" sort="name">站长名称</a></th>
                    <th><a href="javascript:;" sort="service_id">所属客服</a></th>
                    <th class="tAr"><a href="javascript:;" sort="money">总余额</a></th>
                    <th class="tAr"><a href="javascript:;" sort="money_1">日余额</a></th>
                    <th class="tAr"><a href="javascript:;" sort="money_2">周余额</a></th>
                    <th class="tAr"><a href="javascript:;" sort="money_3">月余额</a></th>
                    <th>QQ</th>
                    <th>注册时间</th>
                    <th>最后登陆时间</th>
                    <th>注册来路</th>
                    <th><a href="javascript:;" sort="status">状态</a></th>
                    <th><a href="javascript:;" sort="limit_ad_domain" title="是否限制在任意域名投放">域名</a></th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                <volist name="page.record" id="vo">
                <tr class="tAr">
                    <td class="tAr"><a href="?c=User&a=switchTo&id={$vo.id}" target="_blank" title="切换到站长平台">{$vo.id}</a></td>
                    <td class="tAl" hide="3"><a href="?c=Siter&a=modify&id={$vo.id}" title="编辑站长信息">{$vo.name}</a></td>
                    <td class="tAl" hide="3">{:getServiceNameByUid($vo['service_id'])}</td>
                    <td class="tAr">{:getTotalMoney($vo['money_1'], $vo['money_2'], $vo['money_3'])}</td>
                    <td class="tAr">{$vo.money_1}<flag:isadmin>&nbsp;[<a href="javascript:Recharge.add('{$vo.name}', {$vo.type}, {mone_type : 1})">±</a>]</flag:isadmin></td>
                    <td class="tAr">{$vo.money_2}<flag:isadmin>&nbsp;[<a href="javascript:Recharge.add('{$vo.name}', {$vo.type}, {money_type : 2})">±</a>]</flag:isadmin></td>
                    <td class="tAr">{$vo.money_3}<flag:isadmin>&nbsp;[<a href="javascript:Recharge.add('{$vo.name}', {$vo.type}, {money_type : 3})">±</a>]</flag:isadmin></td>
                    <td class="tAl">
                        <notempty name="vo.qq">
                        <a target=blank href=http://wpa.qq.com/msgrd?V=1&Uin={$vo.qq}&Site=Jetiben.Com&Menu=yes>{$vo.qq}</a>
                        </notempty>
                    </td>
                    <td class="tAl">{$vo.create_time}</td>
                    <td class="tAl">{$vo.last_login_time}</td>
                    <td class="tAl"><a href="{:C('REDIRECT_APP')}?url={$vo.referr}" target="_blank">{:filterDomain($vo['referr'])}</a></td>
                    <td class="tAl">{$vo.status|getUserStatus}</td>
                    <td class="tAl" title="是否限制在任意域名投放">{$vo.limit_ad_domain|getLimitAdDomainCn}</td>
                    <td class="tAl tAction">
                        <if condition="$vo.status EQ 0">
                        <a href="?c=Siter&a=changeStatus&id={$vo.id}&status=1" title="审核站长" t="firm" m="确认审核此站长吗？">审</a>
                        <a href="?c=Siter&a=changeStatus&id={$vo.id}&status=2" title="锁定站长" t="firm" m="确认锁定此站长吗？">锁</a>
                        </if>
                        <if condition="$vo.status NEQ 1">
                        <a href="?c=Siter&a=changeStatus&id={$vo.id}&status=1" title="审核站长" t="firm" m="确认审核此站长吗？">审</a>
                        </if>
                        <if condition="$vo.status EQ 1">
                        <a href="?c=Siter&a=changeStatus&id={$vo.id}&status=2" title="锁定站长" t="firm" m="确认锁定此站长吗？">锁</a>
                        </if>
                        <a href="?c=Siter&a=modify&id={$vo.id}" title="编辑站长信息" hide="3">编</a>
                        <a href="?c=Siter&a=del&id={$vo.id}" title="删除站长" t="firm" m="确认删除此站长吗？">删</a>
                        <a href="?c=Site&search_item_1=id&search_item_val_1={$vo.id}&uid={$vo.id}" title="查看站长所属网站">网</a>
                        <a href="?c=Site&a=add&uid={$vo.id}" title="站长增加网站" hide="3">加网</a>
                        <a href="?c=Zone&search_item_1=id&search_item_val_1={$vo.id}&id={$vo.id}" title="查看站长所属广告位">广</a>
                        <a href="?c=SiterStats&day={:date('Y-m-d')}&id={$vo.id}" title="查看站长报表" target="_blank">报表</a>
                    </td>
                </tr>
                </volist>
            </tbody>
        </table>
    </div><!--/#zoneBodyContent-->
</div><!--/#zoneBody-->
<div id="zoneFooter">{:W('Page/info', [$page])}</div><!--/#zoneFooter-->
<include file="Public:footer" />
